<div class="col_02" id="rightside">
	<div class="col_02_01" id="sysContent_box">
		<div class="main-wrap">
			<div class="m-t">
				<h2>Edit Groups > {$s.cgp_title}</h2>
			</div>
			<div class="m-c">
				<div style="margin-bottom:20px">Here you can add and edit groups to which you can send email campaigns</div>
				{if $err!=''}
				<p class="title1" style="color:red;font-size:12px">{$err}</p>
				{/if}
				{if $err2!=''}
				<p class="title1" style="color:red;font-size:12px">{$err2}</p>
				{/if}
				
				<form action="groups.php?action=editgroup"  method="POST" >
				<table width="100%" border="0" cellpadding="0" cellspacing="5" class="table_style">
					<tr>
						<td>Group Title:</td>
						<td colspan="2">
						  <input  type="text" name="cgp_title" maxlength="200" value="{$s.cgp_title}" style="width:330px">
						</td>
					</tr>
					<tr>
						<td>Group Description:</td>
						<td colspan="2">
							<textarea name="cgp_description" style="width:330px;height:100px">{$s.cgp_description}</textarea>
						</td>
					</tr>
					<tr>
						<td colspan="3" align="center">
							<input name="editId" value="{$s.cgp_id}" type="hidden">
							<input class="bginput button-secondary" accesskey="y" type="submit" name="submit" value=" {$addEdit} Group ">
							{if $s.cgp_id > 0}
							<input class="bginput button-secondary" type="button" name="Input" value=" Add New Group " onclick="window.location.href='groups.php'">
							{else}
							<input class="bginput button-secondary" accesskey="r" type="reset" name="Input" value=" Cancel ">					{/if}
						</td>
					</tr>
				</table>
				</form>
			</div>
		</div>
</div>
<div class="col_02_02" id="side_box">
	<div class="signIn">
		<h2 class="m_t m_t_gray">Member  Center</h2>
		<div class="m_c">
			<div class="mySigned" id="J_sign_form">
				<div id="loginboxx">
					<p class="info">Welcome, <span class="u_name">{$uname}</span>!</p>
					<p class="lnk_panel"><a href="settings.php" class="lnk_arrow">My Account</a></p>
					
					<p class="lnk_panel"><a href="#" onclick="return ajax_out()" class="lnk_arrow">Sign Out</a><div id="loadp"></div></p>
				</div>
			</div>
		</div>
		<div class="m_f"></div>
	</div>
	{if $isTr}
	<div class="panel_box mt_10">
		<h2 class="m_t m_t_gray">Join a Chat </h2>
		<div class="m_c">
			<div>
				<ul>
					<li><a href="findchats.php">Skype Chat</a></li>
					<li><a href="findwebinars.php">Webinars</a></li>
				</ul>
			</div>
			<p class="info"><a href="#"></a></p>							
		</div>
		<div class="m_f"></div>
	</div>
	{/if}
</div>
<div class="clearfix"></div>

{literal}
<script type="text/javascript">
checked=false;
function checkedAll() {
	var aa= document.getElementById('fm1');
	 if (checked == false)
	  {
	   checked = true
	  }
	 else
	  {
	  checked = false
	  }
	for (var i =0; i < aa.elements.length; i++) 
	{
	 aa.elements[i].checked = checked;
	}
}
</script>
{/literal}
<div class="module_box mt_10" id="findResults">
	<div class="m_c">
		<h2>Search </h2>
	{$page}
	  <form action="groups.php"  method="GET" name="search" >
		<input type="hidden" name="editId" value="{$s.cgp_id}" />
		<table width="100%" border="0" cellpadding="5" cellspacing="5" class="table_style">
			<tr>
				<td colspan="2">Name:<br /><input  type="text" name="name"  maxlength="200" value="{$sr.name}" style="width:360px">
				</td>
				<td>Group:	{$s.cgp_title}</td>
			</tr>
			<tr>
				<td>City:</td>
				<td>State:</td>
				<td>Country:</td>
			</tr>
			<tr>
				<td>
					<input  type="text" name="city" maxlength="200" value="{$sr.city}" style="width:175px">
				</td>
				<td>
					<select name="state" >
						{html_options selected=$sr.state options=$state}
					</select>
				</td>
				<td>
					<select name="country">
						{html_options selected=$sr.country options=$country}
					</select>
				</td>
			</tr>
			<tr>
				<td>Specialty:</td>
				<td>Industry:</td>
				<td>Sort Results By:</td>
			</tr>
			<tr>
				<td>
					<select name="speciality" size="">
						{html_options selected=$sr.speciality options=$jobfunction}
					</select>
				</td>
				<td>
					<select name="industry" size="">
						{html_options selected=$sr.industry options=$industry}
					</select>
				</td>
				<td>
					<select name="orderby" size="">
						{html_options selected=$sr.orderby options=$rec_mycontacts}
					</select>
				</td>
			</tr>
			<tr>
				<td colspan="3" align="center">
					<input name="action" value="search" type="hidden">
					<input class="bginput button-secondary" type="submit" name="submit" value=" Search ">
					<input class="bginput button-secondary" type="button" value=" Clear " onclick="location.href='groups.php?editId={$s.cgp_id}#search'">
					<input class="bginput button-secondary" type="button" name="Input" value=" Add New Members To This Group " onclick="location.href='postcontact.php?gid={$s.cgp_id}'"/>
				</td>
			</tr>
		</table>
	</form>

	  <a name="search"></a>
	  <br />
	  <form method="POST" id="fm1" action="groups.php?editId={$s.cgp_id}&ac=delContact" onsubmit="javascript:return confirm('Sure you want to delete?');">
	  <table width="100%" border="0" cellpadding="4" cellspacing="1" class="tableGrey">
              <tr>
				<th>Member Name</th>
				<th>Email</th>
				<th>Phone</th>
				<th>Date Added</th>
				<th><input type="checkbox" name="" onClick="checkedAll()"/> <input type="submit" value=" Delete " class="button-secondary"/></th>
              </tr>
	      {section name=custom loop=$contacts}
              <tr  class="hotline {cycle values="odd,even"}">
		<td><a href="postcontact.php?action=view&editId={$contacts[custom].myc_id}" target="_blank">{$contacts[custom].myc_firstname} {$contacts[custom].myc_lastname}</a></td>
		<td>{$contacts[custom].myc_email}</td>
		<td>{$contacts[custom].myc_phone}</td>
		<td>{$contacts[custom].myc_created|date_format:"%m/%d/%Y"}</td>
		<td><input type="checkbox" name="delId[]" value="{$contacts[custom].myc_id}"></td>
              </tr>
	      {sectionelse}
               <tr  class="hotline {cycle values="odd,even"}">
                <td colspan="8"><font color=red>No Contacts</font></td>
               </tr>
	      {/section}
          </table>
		  </form>
        {$page} 
		<div><input type="button" name="back" value=" Back " onclick="location.href='groups.php'" class="button-secondary"/></div>
</div>
</div>
</div>
				</div>
			</div>
		</div>
	</div>
</section>